package com.spring.Transaction;


import java.lang.annotation.*;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Transactional {

    //传播行为
    Propagation propagation() default Propagation.REQUIRED;
    //隔离级别
    Isolation isolation() default Isolation.DEFAULT;
    //回滚
    Class<? extends Throwable>[] rollbackFor() default {RuntimeException.class};
    //不回滚
    Class<? extends Throwable>[] noRollbackFor() default {};
    //超时
    int timeout() default -1;

}